/*!
 * Copyright (C) 2020 - All Rights Reserved by
 * @author : ZhaoYanbo
 * @email  : zyb920@hotmail.com
 * @created: 2020-10-31
 * @version: 1.0.0.0
 *
 */


#ifndef CIMGPROVIDER_H
#define CIMGPROVIDER_H

#include <QPixmap>
#include <QQuickImageProvider>

class CImgProvider : public QQuickImageProvider
{
public:
    CImgProvider();
    ~CImgProvider() override;

    QPixmap requestPixmap(const QString &id, QSize *size, const QSize &requestedSize) override;

private:
    bool m_bChanged = false;
    QString m_thumbPath;
    QMap<QString, QString> thumbMap;
    QPixmap m_defaultPixmap;
};

#endif // CIMGPROVIDER_H
